Skip to content

ci(repo): add release pre-flight workflow#7822

Merged
jacekradko merged 15 commits intomainfrom
jacek/release-rehearsal
Feb 11, 2026
Merged

ci(repo): add release pre-flight workflow#7822
jacekradko merged 15 commits intomainfrom
jacek/release-rehearsal

Conversation

@jacekradko
Copy link
Copy Markdown
Member

@jacekradko jacekradko commented Feb 11, 2026

Summary

  • Fix the release workflow that has been broken on main since January 10 due to a GitHub GraphQL API timeout in changelog generation
  • Replace @changesets/get-github-info's DataLoader (which batches all 238+ changesets into a single massive GraphQL query) with individual queries per commit/PR, with caching and concurrency limiting
  • Add a Release Preflight workflow that validates release readiness end-to-end without publishing

Root Cause

The @changesets/get-github-info package uses a module-level DataLoader singleton that batches all concurrent requests into a single GraphQL query. With 238+ pending changesets, the resulting query is too large and GitHub's GraphQL API returns "Timeout on validation of query". This has been failing on every push to main since Jan 10.

Changes

.changeset/changelog.js

  • Remove dependency on @changesets/get-github-info and its unbounded DataLoader batching
  • Implement GitHub GraphQL fetching directly with individual queries per commit/PR
  • Add in-memory cache to avoid duplicate fetches for the same commit
  • Add concurrency limiter (max 6) to avoid hitting GitHub secondary rate limits
  • Fix: only overwrite commit author with PR author when associatedPR.author is non-null
  • Fix: sort associated PRs by most recent mergedAt (descending) instead of oldest

.github/workflows/release-preflight.yml (new)

  • Triggers on push to main and manual workflow_dispatch
  • Steps: changeset status validation, build, version packages, post-version diff guard, pack public packages
  • Uploads artifacts for inspection
  • Skips private packages during pack step

Test plan

  • Release Preflight workflow passes end-to-end on this branch (run)
  • Merge to main and verify the Release workflow succeeds

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Feb 11, 2026 7:41pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: 5595f17

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 11, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7822

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7822

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7822

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7822

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7822

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7822

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7822

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7822

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7822

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7822

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@7822

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7822

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7822

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7822

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7822

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7822

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7822

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7822

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7822

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7822

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7822

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7822

commit: 5595f17

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow at .github/workflows/release-rehearsal.yml ("Release Rehearsal") triggered by workflow_dispatch and pushes to main, with concurrency and a 30‑minute timeout. The job checks out code, fetches main for diffs, initializes tooling, runs changeset status (producing .changeset-status.json), builds, rehearses versioning and lockfile updates, guards against unexpected post-version changes, packs public packages to .release-artifacts/pack-output.json, and uploads those artifacts. Also adds a release:status npm script, updates .gitignore for release artifacts, adds a new changeset file, and replaces @changesets/get-github-info with a local GraphQL-based fetcher in .changeset/changelog.js.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'ci(repo): add release pre-flight workflow' is closely related to the main change but uses slightly imprecise terminology; the workflow is actually called 'Release Rehearsal', not 'pre-flight'.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.changeset/changelog.js:
- Around line 94-107: The code unconditionally assigns associatedPR.author to
user which can be null; update the logic so you only overwrite user when
associatedPR exists and associatedPR.author is non-null (i.e., change the final
assignment to check associatedPR.author before setting user). Also, if you
intend to pick the most recent merged PR, reverse the sort comparator in
associatedPullRequests.nodes.sort to compare new Date(b.mergedAt) - new
Date(a.mergedAt) so the newest mergedAt is chosen instead of the oldest; keep
the existing null-merger handling (checking for null mergedAt) when adjusting
the comparator.

In @.github/workflows/release-rehearsal.yml:
- Around line 42-44: The workflow step labelled "Build" currently only runs
"pnpm build" despite the comment saying "Build and test"; either add the test
invocation (e.g., append or replace the run command to include the test script
such as "pnpm test" or "pnpm run build && pnpm test") or update the comment to
remove "and test" so it accurately reflects that the "Build" step only runs
"pnpm build"—target the step with name "Build" and its run value ("pnpm build")
to apply the change.
- Around line 63-74: The "Pack all packages" step currently swallows failures by
appending "|| true" to "pnpm -r exec npm pack --json >
.release-artifacts/pack-output.json 2>&1 || true", so remove the "|| true" so
the step fails on pack errors; then make the "Upload rehearsal artifacts"
job/step (the actions/upload-artifact@v4 step named "Upload rehearsal
artifacts") run unconditionally by adding "if: always()" to that step so
artifacts are still uploaded even when packing fails; if private workspaces are
expected to fail, instead of masking errors, adjust the "pnpm -r exec npm pack"
invocation to target only public packages (filtering by private flag) so
failures are intentional rather than globally suppressed.
🧹 Nitpick comments (2)
.github/workflows/release-rehearsal.yml (1)

39-40: Use the release:status script to keep CI and package.json in sync.

♻️ Suggested change
       - name: Changeset status
-        run: pnpm changeset status --output .changeset-status.json
+        run: pnpm release:status
.changeset/changelog.js (1)

1-3: Consider deriving the repo from GITHUB_REPOSITORY for fork safety.

♻️ Suggested change
-const repo = 'clerk/javascript';
+const repo = process.env.GITHUB_REPOSITORY || 'clerk/javascript';
 const [owner, repoName] = repo.split('/');

Comment thread .changeset/changelog.js Outdated
Comment thread .github/workflows/release-rehearsal.yml Outdated
Comment on lines +42 to +44
# 2) Build and test (same path as production releases)
- name: Build
run: pnpm build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

The step header says “build and test” but only runs build.

Either add the test command here or update the comment to avoid implying test coverage.

✏️ Comment-only fix (if tests are intentionally omitted)
-      # 2) Build and test (same path as production releases)
+      # 2) Build (same path as production releases)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# 2) Build and test (same path as production releases)
- name: Build
run: pnpm build
# 2) Build (same path as production releases)
- name: Build
run: pnpm build
🤖 Prompt for AI Agents
In @.github/workflows/release-rehearsal.yml around lines 42 - 44, The workflow
step labelled "Build" currently only runs "pnpm build" despite the comment
saying "Build and test"; either add the test invocation (e.g., append or replace
the run command to include the test script such as "pnpm test" or "pnpm run
build && pnpm test") or update the comment to remove "and test" so it accurately
reflects that the "Build" step only runs "pnpm build"—target the step with name
"Build" and its run value ("pnpm build") to apply the change.

Comment thread .github/workflows/release-rehearsal.yml Outdated
@jacekradko jacekradko changed the title ci(repo): add release rehearsal workflow ci(repo): add release pre-flight workflow Feb 11, 2026
@jacekradko jacekradko merged commit 6f76e39 into main Feb 11, 2026
43 checks passed
@jacekradko jacekradko deleted the jacek/release-rehearsal branch February 11, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants